// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.checkerframework.checker.regex.qual.Regex;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

import static com.geniusai.aip.auth.constants.LoadConstants.PASSWORD_FORMAT;

/**
 * @author hml14563
 * @date 2021/4/28
 */
@Data
public class UsersVO {
    @NotNull(message = "用户名称不能为空")
    private List<String> usernames;

    @NotNull(message = "用户密码不能为空")
    private String password;

    @Range(min = 0, max = 1, message = "角色判断错误")
    @NotNull(message = "角色不能为为空")
    private Integer role;

    @NotNull(message = "cpu的个数为(1,256)非负数")
    @Range(min = 1, max = 256, message = "cpu的个数为(1,256)非负数")
    private Float cpuNum;

    @JsonProperty("vGpuMemory")
    private Integer vGpuMemory;

    @NotNull(message = "内存大小为[1-256]非负整数")
    @Range(min = 1, max = 256, message = "内存大小为[1-256]非负整数")
    private Integer memorySize;

    @NotNull(message = "存储空间大小不能为空")
    @Range(min = 1, message = "存储空间大小")
    private Integer volumeSize;

    private String dataSpaceName;

    private Integer datasetCapacity;

    private String dataSpaceCapacity;

    @Range(min = 0, max = 1, message = "参数dataSpaceEditFlag为[0-1]非负整数")
    private Integer dataSpaceEditFlag;
}
